<template>
	<view>
		<view class="demonstration">
			<view>
				效果演示
			</view>
			<view class="fileWrap">
				<view ref="fileView" class="hFile" @click="chooseFile">
					<!-- 自定义上传组件样式 -->
					<slot name="upload" class="upload">
						<view class="upload-bg">
							<uni-icons type="cloud-upload" size="36"></uni-icons>
							<text>{{uploadText}}</text>
						</view>
					</slot>
				</view>
			</view>
		</view>
		<jonej-xlsxAnalysis ref="xlsxAnalysis"></jonej-xlsxAnalysis>
		<!-- <xlsxAnalysis ref="xlsxAnalysis"></xlsxAnalysis> -->
	</view>
</template>

<script>
	// import xlsxAnalysis from '@/template/components/xlsxAnalysis/xlsxAnalysis.vue'
	export default {
		// components: {
		// 	xlsxAnalysis
		// },
		data() {
			return {
				uploadText: '上传xlsx文件'
			}
		},
		methods: {
			chooseFile(){
				this.$refs.xlsxAnalysis.chooseFile()
			}
		}
	}
</script>

<style lang="scss">
	.demonstration{
		width: 90%;
		margin: 50upx auto;
		background-color: #FAFAFA;
		text-align: center;
		padding: 20upx 0;
		line-height: 100upx;
	}
	.hFile {
		display: flex;
		justify-content: center;
	}
	.upload-bg {
		background-color: rgba(38, 82, 228, 0.07);
		width: 260rpx;
		height: 260rpx;
		display: flex;
		flex-direction: column;
		justify-content: center !important;
		align-items: center !important;
	}
</style>